using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace CHEnhanceEfCore.Models
{
    /// <summary>
    /// author: chenhao
    /// </summary>
    [Table("menu")]
    public class Menu : BaseModel
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [Key]
        [Column("id")]
        public Guid id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [Column("name")]
        public string name { get; set; }

        /// <summary>
        /// 权限
        /// </summary>
        [Column("permission")]
        public string permission { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        [Column("type")]
        public byte type { get; set; }

        /// <summary>
        ///排序
        /// /// </summary>
        [Column("sort")]
        public int sort { get; set; }

        /// <summary>
        /// 父级菜单ID
        /// </summary>
        [Column("parent_id")]
        public long parentId { get; set; }

        /// <summary>
        /// 菜单路径
        /// </summary>
        [Column("path")]
        public string path { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        [Column("icon")]
        public string icon { get; set; }

        /// <summary>
        /// 菜单组件
        /// </summary>
        [Column("component")]
        public string component { get; set; }

        /// <summary>
        /// 组件名称
        /// </summary>
        [Column("component_name")]
        public string componentName { get; set; }

        /// <summary>
        /// 状态（0:正常, 1:停用）
        /// </summary>
        [Column("status")]
        public byte status { get; set; }

        /// <summary>
        /// 是否可见（0:不可见, 1:可见）
        /// </summary>
        [Column("visible")]
        public bool visible { get; set; }

        /// <summary>
        /// 是否保持活跃状态（0:不保持, 1:保持）
        /// </summary>
        [Column("keep_alive")]
        public bool keepAlive { get; set; } = true;

        /// <summary>
        /// 是否总是显示（0:不总是显示, 1:总是显示）
        /// </summary>
        [Column("always_show")]
        public bool alwaysShow { get; set; } = true;

        /// <summary>
        /// 是否已删除（0:未删除, 1:已删除）
        /// </summary>
        [Column("deleted")]
        public bool deleted { get; set; }
    }
}